//
//  UIButton+Extension.swift
//  XLWibo-Swift
//
//  Created by 王林 on 2016/11/13.
//  Copyright © 2016年 木木. All rights reserved.
//

import UIKit


extension UIButton{
    
    convenience init(titil: String,textColor: UIColor,titleFont:UIFont ,target: Any?, action: Selector?) {
        self.init()
        
        self.setBackgroundImage(UIImage(named: "common_button_white"), for: .normal)
        self.setTitle(titil, for: UIControlState.normal)
        self.setTitleColor(textColor, for: .normal)
        self.titleLabel?.font = titleFont
      
        if let vc = action {
            self.addTarget(target, action: vc, for: .touchUpInside)
        }
        
    }
    
    
    
}
